var modelDao = {
	getPoliceModel:function(no){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/PolicePosition/getModel.do?no="+no,
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getUserModel:function(id){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/User/getUserInfo.do?id="+id,
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getUserPositionModel:function(id){
		var data = {};
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/User/getUserInfo.do?id="+id,
			success:function(d){
				data = d;
				data.x = d.gpsX;
				data.y = d.gpsY;
				data.unitName = "";
				data.mobilephone = d.username;
				data.name = d.username;
				data.no = d.id;
			}
		});
		return data;
	},
	getUserGpsModel:function(id){
		var data = {};
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/User/getModelWithGpsInfo.do?id="+id,
			success:function(d){
				data = d;
				data.x = d.gpsX;
				data.y = d.gpsY;
				data.unitName = "";
				data.mobilephone = d.username;
				data.name = d.username;
				data.no = d.id;
			}
		});
		return data;
	},
	getApartmentModel:function(id){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/Apartment/getModel.do?id="+id,
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getPoiModel:function(id){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/SspoiModel/getModelJson.do?id="+id,
			success:function(d){
				data = d.data;
			}
		});
		return data;
	},
	getApartmentStatistics:function(orgid,mapxy){
		var data = null;
		var isXiaoqu = "";
		if(!mapxy){
			isXiaoqu = "1";
			orgid = "";
		}
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			data:{orgid:orgid,isXiaoqu:isXiaoqu},
			url:burl+"/Apartment/StatisticsByOrgid.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getPoliceStatistics:function(orgid){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			data:{orgid:orgid},
			url:burl+"/PolicePosition/StatisticsByOrgid.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getJingqingModel:function(id){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			data:{id:id},
			url:burl+"/policeCaseTModel/getModelsById.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getJingliData : function(fullid){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			data: {fullid: fullid},
			url: burl + '/QFQZModel/getCountByOrg.do',
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	getJingQingData : function(pid, code){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			data: {orgcode: pid, code: code},
			url: burl + '/policeCaseTModel/getAllByOrg.do',
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	getJingwuxinxiData : function(fullid){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			data: {fullid: fullid},
			url: burl + '/Apartment/getCountByFullid.do',
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	getOrgData : function(pid){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			data: {id: pid},
			url: burl + '/Dept/getDept.do',
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	getStreetJingqingModel:function(id){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			data:{id:id},
			url:burl+"/streetCaseTModel/getModelsById.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getInfoType:function(){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/DictModel/getInfoType.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getBuildintType:function(i){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/DictModel/getBuildintTypeType.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getUserType: function(i){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/DictModel/getUserType.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getTodoType: function(){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url:burl+"/DictModel/getTodoType.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getDept: function(id){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url: burl + "/Dept/getDept.do",
			data: {id: id},
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	checkName: function(value){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url: burl + "/User/isUserThere.do",
			data: {name: value},
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	checkMap: function(value){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url: burl + "/Jcaptcha/check.do",
			data: {code: value},
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	getPosition: function(){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url: burl + "/DictModel/getPosition.do",
			data: {},
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	register: function(value){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url: burl + "/User/register.do",
			data: value,
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	submitUser: function(value){
		var data = null;
		$.ajax({
			dataType:'json',
			type:'post',
			async:false,
			url: burl + "/User/submitUser.do",
			data: value,
			success: function(d){
				data = d;
			}
		});
		return data;
	},
	getLogScoreModel:function(id){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			url: burl + "/PerformanceTModel/getLogScoreModel.do",
			data: {id: id},
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getLogDict:function(){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			url: burl + "/DictModel/getLogType.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getUserDict:function(){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			url: burl + "/DictModel/getUserDict.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getSspoiDict:function(){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			url: burl + "/DictModel/getSspoiDict.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getDeptDict: function(id){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			url: burl + "/DictModel/getDeptDict.do?id=" + id,
			success:function(d){
				data = d;
			}
		});
		return data;
	},
	getAlarmDict: function(){
		var data = null;
		$.ajax({
			dataType: 'json',
			type: 'post',
			async: false,
			url: burl + "/DictModel/getAlarmDict.do",
			success:function(d){
				data = d;
			}
		});
		return data;
	}
};